﻿<Window x:Class="Infrastructure.WpfClient.Views.WaitBox.WaitBoxWindow"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"         
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             ShowInTaskbar="False"
             AllowsTransparency="True" WindowStyle="None" Background="{x:Null}"
             Topmost="True"    
             WindowStartupLocation="CenterScreen" Width="640" Height="480" 
             Keyboard.PreviewKeyDown="Window_PreviewKeyDown"
             Keyboard.PreviewKeyUp="Window_PreviewKeyUp">
    <Window.Resources>
        <Storyboard x:Key="Storyboard1" RepeatBehavior="Forever">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="progressBar" Storyboard.TargetProperty="(RangeBase.Value)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:03" Value="100"/>
            </DoubleAnimationUsingKeyFrames>
            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="progressBar" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)">
                <SplineColorKeyFrame KeyTime="00:00:00" Value="Silver"/>
                <SplineColorKeyFrame KeyTime="00:00:03" Value="DarkGray"/>
            </ColorAnimationUsingKeyFrames>
        </Storyboard>
    </Window.Resources>
    <Window.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource Storyboard1}"/>
        </EventTrigger>
    </Window.Triggers>
    <Grid x:Name="LayoutRoot">
        <Rectangle x:Name="rectangle" StrokeThickness="4" RadiusX="11.5" RadiusY="11.5" Margin="112,120,208,0" MouseLeftButtonDown="move" VerticalAlignment="Top" Height="88"  Fill="DarkGray">
            <Rectangle.Effect>
                <DropShadowEffect/>
            </Rectangle.Effect>
        </Rectangle>
        <ProgressBar x:Name="progressBar" Margin="128,164,224,0" VerticalAlignment="Top" Height="25" Foreground="Silver"/>
        <TextBlock Margin="235.213,168,312,0" VerticalAlignment="Top" Height="21" Text="Processing . . ." TextWrapping="Wrap"/>
        <TextBlock Margin="116.5,132,0,0" VerticalAlignment="Top" Height="20" FontSize="12" Foreground="White" TextWrapping="Wrap" 
                   HorizontalAlignment="Left" 
                   Width="150"
                   Text="{Binding StatusMessage}">
        </TextBlock>
    </Grid>
</Window>
